Skip to content

Conversation

@deve-sh
Copy link
Collaborator

@deve-sh deve-sh commented Nov 3, 2025

No description provided.

Comment on lines +60 to +69
if (!url) {
throw new Error('Error: url is required for server reflection');
}

if (!credentials) {
throw new Error(
'Error: credentials parameter is required for server reflection'
);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not have this error handled and caught in the supported API evaluation function? Because we want the consumer of this library to know even before they reach the stage of calling the reflection API.

If the constructor crashes at initialization, hence notifying the consumer of the problem in their implementation. The listServices function will never be invoked in the first place.

This mimics the behaviour we had earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants